<?php
session_start();
ob_start();
if (!isset($_SESSION['loggedin'])) {

    header('Location: login.php');
}
?>
<?php include 'index.php';
include '../connection.php';

?>



<div id="body-wrapper">

    <div id="main-content">
	<div class="content-box">
		
		  <div class="content-box-header">

                <h3><?= Manage_Products ?></h3>

                <div class="clear"></div>

            </div> 

       

	 

           
                    
              

                    <table>
                        <thead>
                            <tr>
                              
                                <th><?= Product ?></th>
                                <th><?= Visits_Number ?></th>
								
                            </tr>
                        </thead>
						
				

                        <tbody>
                          
                         
                         
                          
                              <?php 
							



							  $sql = "SELECT name_en , visit_num FROM products order by visit_num desc limit 0 , 5";

							 
							  $result = mysql_query($sql);
							  while ($row = mysql_fetch_array($result)) {
							  
								?>
							  <tr>
							  <td><?= $row['name_en']?></td>
							  <td><?= $row['visit_num']?></td>
							  </tr>
							  <?php
					       	}//end while 
									
									?>
									
									
								
									    
									
									  

                              
						
                        </tbody>
						

                    </table>
					
					 
					
					
						
						
                </div> 
				
				<?php $sql = "SELECT transactions FROM settings";

							 
							  $result = mysql_query($sql);
							  $row = mysql_fetch_array($result);
							  
							  
			  ?>
				 <pre style="color:red"; ><?= Transactions_Number ?> <strong style = "color:blue">         <?= $row['transactions'] ?> </strong></pre>
				 
			

            </div> 

        </div> 





    </div> <!-- End #main-content -->

</div>